import React from "react";
import lazyLoad from "@/routers/utils/lazyLoad";
import { LayoutIndex } from "@/routers/constant";
import { RouteObject } from "@/routers/interface";

// dashboard 模块
const bookRouter: Array<RouteObject> = [
	{
		element: <LayoutIndex />,
		meta: {
			title: "Dashboard"
		},
		path: "/person",
		icon: "WomanOutlined",
		name: "陪诊员工",
		children: [
			{
				path: "/person/list",
				element: lazyLoad(React.lazy(() => import("@/views/yuangong/index"))),
				meta: {
					requiresAuth: true,
					title: "页面2",
					key: "/person/list"
				},
				icon: "AppstoreOutlined",
				name: "员工列表"
			},
			{
				path: "/person/add",
				element: lazyLoad(React.lazy(() => import("@/views/yuangong/add"))),
				meta: {
					requiresAuth: true,
					title: "页面2",
					key: "/person/add"
				},
				icon: "AppstoreOutlined",
				isDetail: true,
				name: "新增员工"
			}
		]
	}
];

export default bookRouter;
